﻿using UnityEngine;
using System.Collections;

public class Loading : MonoBehaviour {
    [SerializeField]
    public string _sceneName = "";

    private BetewnScenary btSceneary;

	void Start () {
        btSceneary = new BetewnScenary();
        btSceneary.StartAnimation();
        StartCoroutine(CargarEscena());	
	}
	
	void Update () {
        Debug.Log(Application.isLoadingLevel);
        /*if(!Application.isLoadingLevel)
            Application.LoadLevelAdditive("World");*/
	}

    public IEnumerator CargarEscena(){
        yield return new WaitForSeconds(1);
        Debug.Log("Start");
        Application.LoadLevelAdditive(_sceneName);//  LoadLevel("Escena");
        Debug.Log("End");
    }
}
